import ssl

import requests

urk = 'https://xkczb.xaiip.org.cn/systemservice/sys/user/extend/login'
param = {"username":"18363991756","password":"yuanRUI..1","type":"pwd","code":"0c3lCiHa177h0G0sLhGa1czPlc2lCiHG","agreementOn":"Y"}
headers = {
    'Host': 'xkczb.xaiip.org.cn',
    'Connection': 'keep-alive',
    'Content-Length': '123',
    'xweb_xhr': '1',
    'X-Access-Token': '',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/8391',
    'Content-Type': 'application/json',
    'Accept': '*/*',
    'Sec-Fetch-Site': 'cross-site',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Dest': 'empty',
    'Referer': 'https://servicewechat.com/wx7edb03739857186f/25/page-frame.html',
    'Accept-Encoding': 'gzip, deflate, br',
    'Accept-Language': 'zh-CN,zh',
    'server': 'nginx/1.22.1',
    'date': 'Thu, 07 Sep 2023 11:29:38 GMT'
}
# cookis = dict(cok='ddd')
# json={'Content-Length': 123,'Content-Type': 'application/json'}
# ss = requests.post(urk, json=param, headers=headers, verify=False)
# print(ss.text)
sess = requests.Session()
sess.headers['Host'] = 'xkczb.xaiip.org.cn'
sess.headers['Connection'] = 'keep-alive'
sess.headers['Content-Length'] = '123'
sess.headers['xweb_xhr'] = '1'
sess.headers['X-Access-Token'] = ''
sess.headers[
    'User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/8391'
sess.headers['Content-Type'] = 'application/json'
sess.headers['Accept'] = '*/*'
sess.headers['Sec-Fetch-Site'] = 'cross-site'
sess.headers['Sec-Fetch-Mode'] = 'cors'
sess.headers['Sec-Fetch-Dest'] = 'empty'
sess.headers['Referer'] = 'https://servicewechat.com/wx7edb03739857186f/25/page-frame.html'
sess.headers['Accept-Encoding'] = 'gzip, deflate, br'
sess.headers['Accept-Language'] = 'zh-CN,zh'
sess.headers['server'] = 'nginx/1.22.1'
sess.headers['date'] = 'Thu, 07 Sep 2023 11:29:38 GMT'

sd = sess.post(urk, json=param,verify=False)
print(sd.text)
